with open('stock.csv','r',encoding='utf-8') as f:
    f.readline()
    for line in f:
        line = line.strip()
        items = line.split(',')[2]
        price = float(items)
        if price > 20:
            print(line)
            with open('stock_price_gt_20.csv','a',encoding='utf-8') as f2:
                f2.write(line + '\n')